package com.plum.admin.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * TODO
 *
 * @author 子丶沫
 * @version 1.0
 * @date 2021/9/14 17:07
 */
@Getter
@AllArgsConstructor
public enum EmailEnum {
    /**
     * 修改邮箱
     */
    EDIT_EMAIL("EDIT_EMAIL", "修改邮箱"),
    /**
     * 重置密码
     */
    RESET_EMAIL("RESET_EMAIL","重置密码");

    private String type;
    private String operation;

    public static EmailEnum getInstance(String type) {
        for (EmailEnum typeVar : EmailEnum.values()) {
            if (typeVar.getType().equals(type)) {
                return typeVar;
            }
        }
        return EDIT_EMAIL;
    }
}
